﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BanquetGift.Models
{
    /// <summary>
    /// 份子人
    /// </summary>
    [Table("giftPeople")]
    public class GiftPeople: BaseModel<int>
    {
        /// <summary>
        /// 份子人姓名
        /// </summary>
        [Display(Name = "份子人姓名")]
        [Required(ErrorMessage = "姓名是必须的")]
        [MaxLength(20, ErrorMessage = "姓名最大长度为 20 个字")]
        public string PeopleName { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Display(Name = "性别")]
        public int Gender { get; set; }
        /// <summary>
        /// 居住地址
        /// </summary>
        [Display(Name = "居住地址")]
        [MaxLength(100, ErrorMessage = "居住地址最大长度为 100 个字")]
        public string ResidentialAddress { get; set; }
        /// <summary>
        /// 份子人的描述
        /// </summary>
        [Display(Name = "份子人的描述")]
        [MaxLength(200, ErrorMessage = "描述最大长度 200 个字")]
        public string Description { get; set; }
    }
}
